﻿@model Sharp.Web.Models.LoginModel
@{
    ViewBag.Title = "管理员登录";
    Layout = "~/Views/Shared/_BaseLayout.cshtml";
}

@section example
{
    @(
        Html.X().Window()
            .Closable(false)
            .CloseAction(CloseAction.Destroy)
            .Resizable(false)
            .Icon(Icon.UserGo)
            .Title("登录")
            .Draggable(false)
            .Width(360)
            .Modal(true)
            .BodyPadding(5)
            .Layout(LayoutType.Fit)
            .Items(
                Html.X().FormPanel()
                    .Default()
                    .Layout(LayoutType.Form)
                    .Border(false)
                    .BodyStyle("background-color:transparent;")
                    .Items(
                        Html.X().TextFieldFor(x => x.UserName)
                            .FieldLabel("用户名")
                            .AllowBlank(false)//.Icon(Icon.User)
                            .BlankText("请输入用户名"),
                        Html.X().TextFieldFor(x => x.Password)
                            .InputType(Ext.Net.InputType.Password)
                            .FieldLabel("密码")
                            .AllowBlank(false)//.Icon(Icon.Key)
                            .BlankText("请输入密码"),
                        Html.X().CheckboxFor(x => x.RememberMe).FieldLabel("记住登录")
                    )
            )
            .Buttons(
                Html.X().Button()
                    .Text("登录")
                    .DirectEvents(de =>
                    {
                        de.Click.Action = "Login";
                        de.Click.EventMask.ShowMask = true;
                        de.Click.EventMask.Msg = "正在登录...";
                        de.Click.EventMask.MinDelay = 1000;
                        de.Click.FormID = "#(return this.up('window').down('form');)";
                    })
            )
          )
}